/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author YDZ
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface PmPuAppvouch extends BasicModel<PmPuAppvouch> {
  djno?: string; // 请购编号
  projectno?: string; // 项目编号
  projectname?: string; // 项目名称
  createByName?: string; // 创建人名称
  u8Code?: string; // u8单据号
  pmPuAppvouchsList?: any[]; // 子表列表
}

export const pmPuAppvouchList = (params?: PmPuAppvouch | any) =>
  defHttp.get<PmPuAppvouch>({ url: adminPath + '/material/pu/pmPuAppvouch/list', params });

export const pmPuAppvouchListData = (params?: PmPuAppvouch | any) =>
  defHttp.post<Page<PmPuAppvouch>>({ url: adminPath + '/material/pu/pmPuAppvouch/listData', params });

export const pmPuAppvouchForm = (params?: PmPuAppvouch | any) =>
  defHttp.get<PmPuAppvouch>({ url: adminPath + '/material/pu/pmPuAppvouch/form', params });

export const pmPuAppvouchSave = (params?: any, data?: PmPuAppvouch | any) =>
  defHttp.postJson<PmPuAppvouch>({ url: adminPath + '/material/pu/pmPuAppvouch/save', params, data });

export const pmPuAppvouchDelete = (params?: PmPuAppvouch | any) =>
  defHttp.get<PmPuAppvouch>({ url: adminPath + '/material/pu/pmPuAppvouch/delete', params });
